<?php
if ($intAuctionItemID){ 
    include (MODULE . "/action/qrySelectAuctionItem");
?>

	<div class="StatusNotLoaded">
		<a href='<?php echo ScreenURL("EnterAuctionItem",array('intAuctionItemID'=>$myrow[0]) )?>'>update</a> /&nbsp;
		<?php
		if($myrow[EbayStatus] < 2){
		?>
		<a href="<?php echo ScreenURL("EnterAuctionItem",array('intAuctionItemID'=>$myrow[0],'ACTION'=>"qryDeleteAuctionItem") ) ?>" onclick="return confirmLink(this, 'Delete "<?php echo $myrow[1]?>"');">delete</a> / 
		<?php
		}
		?>
		<a href='<?php echo ScreenURL("EbayTemplate",array('intAuctionItemID'=>$myrow[0]) )?>' target="_blank">create eBay description</a>
	    <a href='<?php echo ScreenURL("EbayTemplateNoTerms",array('intAuctionItemID'=>$myrow[0]) )?>' target="_blank">create eBay description without terms</a>
		<a href='<?php echo ScreenURL("EnterAuctionItem",array('ACTION'=>'qryAddAuctionItemDuplicateRecord','intAuctionItemID'=>$myrow["ID"]))?>'>/ Duplicate Item</a>
		<a href='<?php echo ScreenURL("EnterProduct",array('ACTION'=>'actCopyAuctionItemToShop','intAuctionItemID'=>$myrow["ID"]))?>'>/ Copy To Shop</a>
		<?php 
			if($myrow[Vendor]){
				echo "<a href='".ScreenURL("EnterAuctionItem",array('txtVendor'=>$myrow[Vendor],'cboCommission'=>$myrow[Commission]))."'>/ Add new Item For Vendor</a>";
			}?>
		<h1><?php echo $myrow[ID]." - ".$myrow[ItemName]."</h1>
		<h2>".$myrow[EbayStatusName]."&nbsp;".$myrow[AuctionID]?></h2>
		<a href='<?php echo ScreenURL("DisplayVendor",array('intVendorID'=>$myrow[Vendor]))?>'><?php  echo DisplayLookupValue("tblVendor","concat(Surname, \", \",FirstName, \", \",Address1)", $myrow[Vendor])?></a>
		<br />
		<br /><?php echo $myrow[Description]?>
		
		<br /><b>Condition : </b>
		
		<a href="JavaScript: newWindow = openWin( '<?php echo ScreenURL("DisplayCondition",array('intConditionID'=>$myrow[Condition])) ?>', 'DisplayCondition', 'width=800,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1' ); newWindow.focus()">
		<?php echo DisplayLookupValue("tblCondition","Condition",$myrow[Condition])?>
		</a>
	
		<b>Reserve Price :&nbsp;</b>&nbsp;
		<?php echo $myrow[ReservePrice]?>&nbsp;
		
		<b>Reserve Fee :&nbsp;</b>&nbsp;
		<?php echo$myrow[ReserveFee]?>&nbsp;
		
		<b>Cost Price :&nbsp;</b>&nbsp;<?php echo $myrow[CostPrice]?>&nbsp;
			<?php
	    	if($myrow[VAT] == "1"){?>
	
	           <b>VAT : </b>&nbsp;<img src='./images/tick.gif' width='8' height='16' border='0' alt='yes'>&nbsp;
	           <b>Vat Rate : </b>&nbsp;<?php echo DisplayLookupValue("tblVatRate","VatRate",$myrow[VatRate])?>&nbsp;
	           <b>VAT Number :&nbsp;</b><?php echo $myrow[VATNumber]?>&nbsp;
	
			<?php
		    }
			?>
		<b>Background History : </b>&nbsp;<?php echo $myrow[BackgroundHistory]?>
		  
			<?php
		    if($myrow[UnderWarranty] == "1"){
		        echo "
		                <b>Still Under Warranty</b>
		            &nbsp;
		        ";
		    }
		
		    if($myrow[Manual] == "1"){
		        echo "
		
		                <b>Manuals Included </b>
		        ";
		    }
			?>
			
	    <b>Height :&nbsp;</b>&nbsp;<?php echo $myrow[Height]?>&nbsp;
	    <b>Width :&nbsp;</b>&nbsp;<?php echo $myrow[Width]?>&nbsp;
		<b>Length/Depth :&nbsp;</b><?php echo $myrow[Length]?>&nbsp;
	    <b>Weight (kg) :&nbsp;</b>&nbsp;<?php echo $myrow[Weight]?>&nbsp;
	    <b>Quantity :&nbsp;</b>&nbsp;<?php echo $myrow[Quantity]?>&nbsp;
			<?php
		    //if($myrow[Photos] == "1"){
				?>
				<br/><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto1"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'>
				<?php if($myrow["UploadedPhoto2"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto2"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto3"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto3"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto4"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto4"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto5"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto5"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto6"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto6"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto7"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto7"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto8"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto8"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				<?php if($myrow["UploadedPhoto9"]){ ?><img src='./images/auction/thumbz/<?php echo $myrow["UploadedPhoto9"]?>' border='0' alt='Item <?php echo $myrow["ID"]?>' width='100'><?php }?>
				
				<?php
		    //}
	
		    if($myrow[DirectDespatch] == "1"){
		        echo "
		        <b>Direct Despatch</b>
		        ";
		    }?>
	</div>
	
	<div class="StatusLoaded">
		 
		<?php 
		include (MODULE . "/action/qrySelectCarriage_Class");  
 
			
			if($myrow[QuotedCarriage] == 0){ 
				$intTotalCarriage = $objCarriage->myrow[UKPrice] + $objCarriage->myrow[EuropePrice] + $objCarriage->myrow[USAPrice]+$objCarriage->myrow[AustraliaPrice];
				  if($intTotalCarriage > 0){
					?>	   
					<p>
					Postage and Packing for:
					</p>
					<p>	
						<img src="http://www.delboyslockup.co.uk/images/flag_UK.jpg" height="20" > UK <?php echo CURRENCY.$objCarriage->myrow[UKPrice]?>
					&nbsp;
						<img src="http://www.delboyslockup.co.uk/images/flag_EU.jpg" height="20" >  European Union <?php if($objCarriage->myrow[EuropePrice] != 0) {echo CURRENCY.$objCarriage->myrow[EuropePrice];}else{echo " : Postage Not Available";}?>
					&nbsp;
						<img src="http://www.delboyslockup.co.uk/images/flag_USA.jpg" height="20" > <img src="http://www.delboyslockup.co.uk/images/flag_Canada.jpg" height="20" >  North America <?php if($objCarriage->myrow[USAPrice] != 0){echo CURRENCY.$objCarriage->myrow[USAPrice]; }else{ echo " : Postage Not Available";}?> 
					&nbsp;
						<img src="http://www.delboyslockup.co.uk/images/flag_Japan.jpg" height="20" > <img src="http://www.delboyslockup.co.uk/images/flag_Australia.jpg" height="20" >  Rest of world <?php if($objCarriage->myrow[AustraliaPrice] != 0){echo CURRENCY.$objCarriage->myrow[AustraliaPrice];} else { echo " : Postage Not Available"; }?>
					</p>
					<?php		
				}
			}else{
				echo "<b>Quoted Carriage :&nbsp;</b>&nbsp;".$myrow[QuotedCarriage]."&nbsp;";	
			}
			?>
 
		 <b>Ebay&nbsp;Insertion&nbsp;Fee :&nbsp;</b>&nbsp;<?php echo $myrow[EbayInsertionFee]?>&nbsp;
		 <b>Auction&nbsp;Start :&nbsp;</b>&nbsp;<?php echo ReformatFromMySqlDate($myrow[AuctionStart])?>&nbsp;
		 <b>Auction&nbsp;Duration :&nbsp;</b><?php echo $myrow[AuctionDuration]?>&nbsp;days
		 <b>Selling&nbsp;Price :&nbsp;</b><?php echo $myrow[AuctionSellingFee]?>&nbsp;
	</div>
	
			<?php 
		    if($myrow[ReceivedPayment] == "1"){
			?>
				<div class="StatusPaid">
			        <b>PayPal Transaction ID :&nbsp;</b>&nbsp;<a href="https://www.paypal.com/sold/id=<?php echo $myrow["PayPalTXN"]?>" target="_blank"><?php echo $myrow[PayPalTXN]?></a>&nbsp;
					<b>PayPal Fee :&nbsp;</b>&nbsp;<?php echo $myrow[PayPalFee]?>&nbsp;		 
					<b>Sale Price :&nbsp;</b>&nbsp;<?php echo $myrow[AuctionSellingFee]?>&nbsp;
					<b>Carriage Paid :&nbsp;</b>&nbsp;<?php echo $myrow[CarriagePaid]?>&nbsp;
					<b>Our Commission :&nbsp;</b>&nbsp;<?php echo $myrow[OurCommission]?>&nbsp;
					<b>Pay Us :&nbsp;</b>&nbsp;<?php echo $myrow[PayUs]?>&nbsp;
					<b>Pay Vendor :&nbsp;</b>&nbsp;<?php echo $myrow[PayVendor]?>&nbsp;
					<b>Date Paid :&nbsp;</b>&nbsp;<?php echo ReformatFromMySqlDate($myrow[DatePaid])?>&nbsp;
					<b>Purchaser Ebay ID :&nbsp;</b><?php echo $myrow[PurchaserEbayID]?>&nbsp;
					<?php echo $myrow[Title]."<br/>".
					$myrow[CompanyName]."<br/>
					".$myrow[FirstName]."&nbsp;".$myrow[Surname]."<br/>
					".$myrow[Address1]."<br/>
					".$myrow[Address2]."<br/>
					".$myrow[Town]."<br/>
					".$myrow[County]."<br/>
					".$myrow[PostalCode]."<br/>
					".$myrow[Country]."<br/>
					<b>Purchaser Phone :&nbsp;</b>".$myrow[Phone]."<br/>
					<b>Purchaser Mobile :&nbsp;</b>".$myrow[Mobile]."<br/>
					<b>Purchaser Fax :&nbsp;</b>".$myrow[Fax]."<br/>
					<b>Purchaser Email :&nbsp;</b>".$myrow[Email]."<br/>
				</div>";
			}
	
	
		    if($myrow[Despatched] == "1"){
		        echo "
				<div class='StatusDespatched'>
			        <b>Despatch Date :&nbsp;</b>".ReformatFromMySqlDate($myrow[DespatchDate])."<br/>
					<b>Courier : </b>&nbsp;".DisplayLookupValue("tblCourier","Courier",$myrow[Courier])."<br/>
			        <b>Consignment Number :&nbsp;</b>&nbsp;".$myrow[ConsignmentNumber]."<br/>
			        <b>Cheque Sent (date) :&nbsp;</b>".ReformatFromMySqlDate($myrow[ChequeSent])."<br/>
		        </div>";
			}
	

}else{
	echo "No AuctionItem selected.";
}
?>
